package com.lipy.microorder.controller;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: lipy
 * @create: 2020-06-15 21:53
 **/
@RequestMapping("/order")
@RestController
public class OrderController {

    @RequestMapping("queryOrder")
    public Object queryOrder() {
        System.out.println("query order ...");
        return "query ok";
    }

    @RequestMapping("addOrder")
    public Object addOrder(@RequestParam("orderId") String orderId,
                           @RequestParam("orderName") String orderName){
        System.out.println("orderId = " + orderId + " orderNmae = "+ orderName);
        return "add order id("+orderId+") name("+orderName+")";
    }
}
